package domain

import "strings"

func (d *Domain) getQueue(experimentID uint, suffix ...string) (string, error) {
	experiment, err := d.course.GetExperimentByID(experimentID)

	switch {
	case err != nil:
		return "", err
	case len(suffix) != 0:
		return experiment.GetQueue() + "." + strings.Join(suffix, "."), nil
	default:
		return experiment.GetQueue(), nil
	}
}
